package client

import (
	"context"
	"google.golang.org/grpc"
	commentv1 "jk-time/webook/api/proto/gen/comment/v1"
)

type CommentSerivceClient struct {
	remote commentv1.CommentSerivceClient
}

func NewCommentSerivceClient(remote commentv1.CommentSerivceClient) CommentSerivceClient {
	return CommentSerivceClient{
		remote: remote,
	}
}
func (c CommentSerivceClient) GetCommentList(ctx context.Context, in *commentv1.CommentListRequest,
	opts ...grpc.CallOption) (*commentv1.CommentListResponse, error) {
	return c.remote.GetCommentList(ctx, in, opts...)
}
func (c CommentSerivceClient) DeleteComment(ctx context.Context, in *commentv1.DeleteCommentRequest, opts ...grpc.CallOption) (*commentv1.DeleteCommentResponse, error) {
	return c.remote.DeleteComment(ctx, in, opts...)
}
func (c CommentSerivceClient) CreateComment(ctx context.Context, in *commentv1.CreateCommentRequest, opts ...grpc.CallOption) (*commentv1.CreateCommentResponse, error) {
	return c.remote.CreateComment(ctx, in, opts...)
}

// GetMoreReplies Comment的id为0 获取一级评论
func (c CommentSerivceClient) GetMoreReplies(ctx context.Context, in *commentv1.GetMoreRepliesRequest, opts ...grpc.CallOption) (*commentv1.GetMoreRepliesResponse, error) {
	return c.remote.GetMoreReplies(ctx, in, opts...)
}
